import logging

logger = logging.getLogger('aphw')

def null_logging(logger):
    class NullHandler(logging.Handler):
        def emit(self, record):
            pass

    logger.addHandler(NullHandler())

def debug_logging(logger):
    logger.addHandler(logging.FileHandler('aphw.log'))
    logger.addHandler(logging.StreamHandler())
    logger.setLevel(logging.DEBUG)

null_logging(logger)
# debug_logging(logger)
